fix: use JSON serialization for array fields in spreadsheet editor#2741
fix: use JSON serialization for array fields in spreadsheet editor#2741algusarov wants to merge 1 commit intoappwrite:mainfrom
Conversation
Replace comma-based join/split with JSON.stringify/parse to prevent corruption of array items containing commas (JSON, CSV, plain text). Closes appwrite#2740
Console (appwrite/console)Project ID: Sites (1)
Tip Functions can run for up to 15 minutes before timing out |
WalkthroughThis pull request modifies the string input component for database table rows to handle array values using JSON format instead of comma-separated strings. Array values are now serialized with Estimated code review effort🎯 2 (Simple) | ⏱️ ~13 minutes Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (5)**/*.{ts,tsx,js,jsx,svelte}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/routes/**/*.svelte📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx,svelte,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.svelte📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/routes/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (3)📚 Learning: 2025-09-30T07:41:06.679ZApplied to files:
📚 Learning: 2025-10-04T11:46:32.504ZApplied to files:
📚 Learning: 2025-10-07T14:17:11.597ZApplied to files:
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

Summary
Root Cause
The spreadsheet editor used comma-based serialization (
value.map(String).join(', ')andstringValue.split(',')) which corrupted any array items containing commas. Simply opening a cell for editing would corrupt in-memory data through two-way binding.See detailed analysis in #2740.
This is an experimental fix that changes console UX for array-based types.
Users will now need to enter array values in JSON format (e.g.,
["item1", "item2"]) instead of comma-separated values. This needs careful review to ensure it doesn't negatively impact the user experience for simpler use cases.Closes #2740
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.